﻿using Common.EFCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace NetByDocker.Store.InMemory
{
    public static class ServiceCollectionExtensions
    {
        public static void AddInMemoryDbContextService(this IServiceCollection serviceCollection, IConfiguration configuration)
        {
            var conn = configuration["DbConfig:Memory"];
            Console.WriteLine($"数据库地址为：{conn}");
            serviceCollection.AddEntityFramework<OpenDbContext>(conn);
        }
    }
}